﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace WpfApp.Controls
{
    public partial class MsgForm : Form
    {
        public MsgForm()
        {
            InitializeComponent();
        }

        //  接受主窗体发来的消息并解析
        protected override void DefWndProc(ref System.Windows.Forms.Message m)
        {
            switch (m.Msg)
            {
                case ReturnOperation.Message.WM_MSG://处理消息
                    // ip,type,para
                    //message = string.Format("收到从应用程序发出的消息！参数为：{0}, {1}", m.WParam, m.LParam);
                    DoSomeString();
                    break;
                default:
                    base.DefWndProc(ref m);
                    break;
            }
        }

        private void DoSomeString()
        {
            MessageBox.Show(" 执行回调");
        }
    }
}
